package com.chenfan.magic.config;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * web配置
 *
 * @author 周夕
 * @date 2020-02-15 15:39
 */
@Configuration
public class WebMvcConfig implements WebMvcConfigurer {

    @Autowired
    private MagicHandlerInterceptorAdapter magicHandlerInterceptorAdapter;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(magicHandlerInterceptorAdapter)
                .addPathPatterns("/**")
                .excludePathPatterns("/dg/service/export/**",
                        "/idc-atom-magic/dc_getAllShopList",
                        "/magicException",
                        "/idc-atom-magic/dc_shops_list",
                        "/idc-atom-magic/dc_brand_shop_tree",
                        "/idc-atom-magic/dc_brand_list",
                        "/idc-atom-magic/saveLog");
    }

}
